/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package xlsBeans;

import com.smartxls.WorkBook;

/**
 *
 * @author Lucas
 */
public class MainFieldsXLS {
    
    private String basisofrecord;
    private String institutioncode;
    private String collectioncode;
    private String catalognumber;
    private String scientificname;

    private int sp;

    public MainFieldsXLS() {
        this.basisofrecord = "";
        this.institutioncode = "";
        this.collectioncode = "";
        this.catalognumber = "";
        this.scientificname = "";
    }

    public MainFieldsXLS(WorkBook w, int l, int sp) {
        try{
            setMainFields(w, l, sp);
        }catch(Exception e){
            e.printStackTrace();
        }
    }
    public void setMainFields(WorkBook w, int l, int sp) throws Exception {
        this.basisofrecord = w.getText(l, 2 + sp);
        this.institutioncode = w.getText(l, 3 + sp);
        this.collectioncode = w.getText(l, 4 + sp);
        this.catalognumber = w.getText(l, 5 + sp);
        this.scientificname = w.getText(l, 6 + sp);
        }

    public boolean isSetMain(){
        if(this.basisofrecord.equals("") && this.institutioncode.equals("") && this.collectioncode.equals("") && this.catalognumber.equals("") && this.scientificname.equals(""))
            return  false;
        else return true;
    }

    public String getBasisofrecord() {
        return basisofrecord;
    }

    public void setBasisofrecord(String basisofrecord) {
        this.basisofrecord = basisofrecord;
    }

    public String getCatalognumber() {
        return catalognumber;
    }

    public void setCatalognumber(String catalognumber) {
        this.catalognumber = catalognumber;
    }

    public String getCollectioncode() {
        return collectioncode;
    }

    public void setCollectioncode(String collectioncode) {
        this.collectioncode = collectioncode;
    }

    public String getInstitutioncode() {
        return institutioncode;
    }

    public void setInstitutioncode(String institutioncode) {
        this.institutioncode = institutioncode;
    }

    public String getScientificname() {
        return scientificname;
    }

    public void setScientificname(String scientificname) {
        this.scientificname = scientificname;
    }

    public int getSp() {
        return sp;
    }

    public void setSp(int sp) {
        this.sp = sp;
    }


}
